#ifndef WORDBUFFER_H
#define WORDBUFFER_H

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef struct _char
{
	char  c;
	int  row;
	int  col;
	struct _char *  next;
}  Char;

class WordBuffer
{
public:
	WordBuffer(void);
	~WordBuffer(void);
public:
	void pushChar(char c, int  row, int  col);
	char readCurrentTop();
	bool getWord(int  length, char  *dest = NULL);
	int  getBufferLength();
	Char operator[](int  index);
private:
	Char  head;
	Char  *  last;
	int   count;
};


#endif
